package admin

import (
	"es-ad/helper/helper"
	"es-ad/helper/response"
	"es-ad/helper/verify"
	"github.com/gin-gonic/gin"
)

type SingleAddFormParams struct {
	IdAd        int    `json:"id_ad" form:"id_ad" binding:"required" label:"广告ID"`
	BizId       int    `json:"biz_id" form:"biz_id" binding:"required" label:"事业部ID"`
	GroupId     int    `json:"group_id" form:"group_id" binding:"required" label:"集团ID"`
	UserId      int    `json:"user_id" form:"user_id" binding:"required" label:"员工ID"`
	ModelId     int    `json:"model_id" form:"model_id" binding:"required" label:"加微号ID"`
	ContactType int    `json:"contact_type" form:"contact_type" binding:"required"`
	Type        int    `json:"type" form:"type" binding:"required"`
	HandleType  int    `json:"handle_type" form:"handle_type" binding:"required"`
	KfName      string `json:"kf_name" form:"kf_name" binding:"required"`
	AdminName   string `json:"admin_name" form:"admin_name" binding:"required"`
	ChkValue    string `json:"chk_value" form:"chk_value" binding:"required"`
}

func SingleAdd() gin.HandlerFunc {

	return func(c *gin.Context) {

		var vFormParams SingleAddFormParams

		if err := c.ShouldBind(&vFormParams); err != nil {
			verify.Verify(c, err)
			return
		}

		helper.PParams(vFormParams)

		response.Success(c, gin.H{"message": "success"})

		return

	}

}
